﻿@model IEnumerable<DLM.Domain.DTO.SalutationDTO>
@using DLM.Domain.Model;
@using Webdiyer.WebControls.Mvc;
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("ul.clearfix li").mouseover(function () {

                $(this).addClass("hover");
            });
            $("ul.clearfix li").mouseout(function () {

                $(this).removeClass("hover");
            });
            $("a").css("cursor", "pointer");
        });
    </script>
<h3>
    我的招呼列表<a>总共 @Model.Count() 个招呼</a></h3>
<div class="tr clearfix">
    <div class="friend_list">
        <ul class="clearfix">
            @foreach (var item in Model)
            {
                
                
                   <li>
                    <div class="friend_item">
                        <div class="friend_pic">
                            <a href="@Url.Action("View", "User", new { id = item.UserID })">
                              
                                
                                  @if (item.GreetPhoto == "none_75_75.png")
                                  {
                                        <img src="@Url.Content("~/Content/ad/none_75_75.png")" alt="头像" height="77px" width="77px"/>
                                  }
                                  else
                                  {   <img src="@Url.Content("~/Files/Photos/" + item.UserID + "/Title/" + item.GreetPhoto)" alt="" />}
                                </a>
                            @if (item.Type == (int)DLM.Domain.Model.GreetType.Phone)
                            {
                                <div class="tips">
                                    @item.Message<span class="tra"></span></div>
                            }
                            else if (item.Type == (int)DLM.Domain.Model.GreetType.Normal)
                            { 
                                <div class="tips">
                                     @item.GreetAccount 给您一个普通招呼<span class="tra"></span></div>
                            }
                            else if (item.Type == (int)DLM.Domain.Model.GreetType.Friend)
                            {
                                <div class="tips">
                                     @item.GreetAccount 对您表达了好感<span class="tra"></span></div> 
                            }
                        </div>
                        <div class="friend_info">
                            <a href="@Url.Action("View", "User", new { id = item.UserID })">@item.GreetAccount</a></div>
@*                        <div class="friend_act">
                            <div class="friend_act_left">
                                <a href="@Url.Action("View", "User", new { id = item.UserID })">查看资料</a>
                            </div>
                    
                        </div>*@
                    </div>
                </li>
                
            }
        </ul>
        <div class="paging">
        @Ajax.Pager(Model as PagedList<DLM.Domain.DTO.SalutationDTO>, new PagerOptions
   {
       PageIndexParameterName = "greetid",
       CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>",
       //NumericPagerItemWrapperFormatString = "<a>{0}</a>",
       PrevPageText = "<",
       NextPageText = ">",
       ShowNumericPagerItems = true,
       ShowFirstLast = false,
       ShowPrevNext = true,
       CssClass = "scott",
       MorePageText = "...",
       SeparatorHtml = ""
   },
        new AjaxOptions { UpdateTargetId = "divGreet" }
    )
    </div>
    </div>
</div>
